import request from '@/utils/request'

// 查询道闸列表
export function listBarrier(query) {
  return request({
    url: '/control/barrier/list',
    method: 'get',
    params: query
  })
}

// 查询道闸详细
export function getBarrier(id) {
  return request({
    url: '/control/barrier/' + id,
    method: 'get'
  })
}

// 新增道闸
export function addBarrier(data) {
  return request({
    url: '/control/barrier',
    method: 'post',
    data: data
  })
}

// 修改道闸
export function updateBarrier(data) {
  return request({
    url: '/control/barrier',
    method: 'put',
    data: data
  })
}

// 删除道闸
export function delBarrier(id) {
  return request({
    url: '/control/barrier/' + id,
    method: 'delete'
  })
}
